//
//  Discover_MindItem.m
//  MindBox
//
//  Created by MS on 16-1-8.
//  Copyright (c) 2016年 Lemon. All rights reserved.
//

#import "Discover_MindItem.h"
#import "ScrollCellView.h"
#import "UIImageView+WebCache.h"
@interface Discover_MindItem ()




@end

@implementation Discover_MindItem

-(void)setGoods:(Goods *)goods
{
    _goods = goods;
    
    self.titleView.text = goods.short_name;
    [self.imageView sd_setImageWithURL:[NSURL URLWithString:goods.image_url]];
    NSString * price = [NSString stringWithFormat:@"¥ %.2f",[goods.p_price floatValue]];
    self.priceView.text = price;
}



+(instancetype)cellWithcollectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
{
 
    NSString * className = NSStringFromClass([self class]);
    UINib *  nib = [UINib nibWithNibName:className bundle:nil];
    [collectionView registerNib:nib forCellWithReuseIdentifier:className];
    return [collectionView dequeueReusableCellWithReuseIdentifier:className forIndexPath:indexPath];

}




@end
